import request from '@/utils/request'

export const listCheckgroup = (search) => 
    request({
        url: '/checkgroup',
        method: 'get',
        params: {
            pageNum: search.pageNum,
            pageSize:search.pageSize,
            queryString:search.queryString
        }
    }) 

export const removeCheckgroup = (id) => 
    request({
        url: '/checkgroup/' + id,
        method: 'delete'
    })

export const updateCheckgroup = (id, checkgroup) =>
    request({
        url: '/checkgroup/' + id,
        method: 'put',
        data: checkgroup
    })

export const saveCheckgroup = (checkgroup) => 
    request({
        url: '/checkgroup',
        method: 'post',
        data: checkgroup        
    })

export const listAllCheckgroup = () =>
    request({
        url: '/checkgroup/all',
        method: 'get'
    })

export const getCheckgroupById = (id) =>
    request({
        url: '/checkgroup/' + id,
        method: 'get'
    })